package com.example.test.启动线程.sleepwait;

public class B implements Runnable {

    @Override
    public void run() {
        synchronized (this) {
            try {
                Thread.sleep(3000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            System.out.println("睡眠结束");
        }
    }
}